#include <iostream>
using namespace std;

int main() {
    int a,b;
    int s,y;
    cin >> a >> b;
    s = a / b;
    y = a % b;
    cout << s << " " << y;
    return 0;
}